package com.nanhang.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @TableName employees
 */

@Data
public class Employees implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private String sex;

    private Integer age;

    private Integer deptid;

    @TableField(exist = false)   // 说明不存在此字段
    private String deptname;


    // 逻辑删除字段
    @TableLogic
    private Integer deleted;

    // 自动填充配置
    @TableField(fill = FieldFill.INSERT)            // 插入数据时填充
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)     // 插入和修改时都会填充
    private LocalDateTime updateTime;


    private static final long serialVersionUID = 1L;
}